<?php




/**
* Update storage locations of various sizes of an album in a bulk
*/

/*
Array
(
    [store_locations] => Array
        (
            [7] => F:/images/uploaded/done
            [1] => D:\thumbs/9/1
            [2] => 
            [8] => 
            [3] => D:\thumbs/9/3aa
            [9] => D:\thumbs/9/9
            [4] => 
            [5] => D:\thumbs/9/5
            [6] => D:\thumbs/9/6
        )

    [album_id] => 9
    [Submit] => Submit
)
*/
$albumsizes = new albumsizes();
$album_id = $variable->post('id', 'integer', 0);
foreach($_POST['store_locations'] as $size_id => $store_location)
{
	$store_location = str_replace('\\', '/', $store_location);
	if(!$store_location) continue;

	$albumsizes->add_album_size_originally_scanned($album_id, $store_location, (int)$size_id);
}
$messenger = new messenger('notice', 'The bulk records modified/added.');
stopper::url('albumsizes-list.php?id='.$album_id);
?>